package comp
{
	use namespace comp_layout;
	
	import comp.style.css.MergeLayout;
	import comp.style.skin.CheckOverSkin;
	import comp.style.skin.CheckSkin;
	import comp.style.skin.CheckedSkin;
	
	import flash.display.DisplayObject;
	import flash.events.MouseEvent;
	import flash.geom.Rectangle;

	/**
	 *<h1>chekcbox</h1>
	 * 继承至button
	 * 支持icon图标支持换肤
	 * </br>
	 * 示例:webgame.missionDaily.QuestItem 133,57行
	 * @author:pu
	 * data:2010.10.18
	 */
	public class CheckBox extends Button
	{
		public function CheckBox()
		{
			super();			
			this._themeName="comp::CheckBox";
		}
		
		override protected function mouseDownHandler(e:MouseEvent):void
		{
			if(selected==true)
				selected=false;
			else
				selected=true;
			super.mouseDownHandler(e);		
				
		}
	}
}